// TOWN DIALOGUE SCRIPT
//    Town 1: Cresent Entry

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Jonathan ***
begintalknode 1;
	state = -1;
	personality = 112;
	nextstate = 2;
	condition = 1;
	question = "Jonathan";
	text1 = "The entry official is busy working on some papers in the office.";
	text2 = "He seems somewhat annoyed at your intrusion.";
	text3 = "_I am Jonathan, what do you want?_";
	text5 = "Jonathan continues working on some papers while trying to ignore you.";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 112;
	nextstate = -1;
	condition = 1;
	question = "_What is your job here?_";
	text1 = "Jonathan looks even more annoyed and says _I am the empires entry official._";
	text2 = "_Is there something I can help you with._ he says testily.";

begintalknode 3;
	state = 2;
	personality = 112;
	nextstate = -1;
	condition = 1;
	question = "_What do you know about the she-devil?_";
	text1 = "Jonathan says _I do not know much about her._";
	text2 = "_The she-devil is contained within the valley while the empire decides what to do with it._";
	text3 = "Jonathan snorts _What do you want from me, a reward for ridding Cresent Valley of the creature!_";
	code =
		if (get_flag(50, 1) > 0) {
			remove_string(1);
			remove_string(2);
		}
		else {
			remove_string(3);
		}
	break;

begintalknode 4;
	state = 2;
	personality = 112;
	nextstate = 3;
	condition = get_flag(1, 0) == 0;
	question = "_Can I get access to Cresent Valley?_";
	text1 = "_The empire has restricted access, why do you want to go in?_";

begintalknode 5;
	state = 2;
	personality = 112;
	nextstate = -1;
	condition = get_flag(1, 0) == 1;
	question = "_Sorry to bother you._";
	text1 = "Jonathan returns to his work, completely ignoring you.";
	action = END_TALK;

begintalknode 6;
	state = 3;
	personality = 112;
	nextstate = 4;
	condition = get_flag(1, 0) == 0;
	question = "_I have been asked to help by a citizen of Cresent Valley._";
	text1 = "Jonathan pauses for a moment, sizing up the party.";
	text2 = "_That had to have been Ben.  He told me someone would be by to help us._ Jonathan says sarcastically.";
	text3 = "_OK, you can pass._";
	text4 = "_Just do not blame me when you are slaughtered by that creature._";

begintalknode 7;
	state = 4;
	personality = 112;
	nextstate = -1;
	condition = get_flag(1, 0) == 0;
	question = "_Thank you._";
	text1 = "Jonathan just snorts and goes back to work.";
	action = END_TALK;
	code = 
		set_flag(1, 0, 1);
	break;

// *** Smithers ***
begintalknode 15;
	state = -1;
	personality = 113;
	nextstate = 11;
	condition = 1;
	question = "Smithers";
	text1 = "The muscular man is busy working several pieces of steel into armor and weapons.  He looks up at you as you enter his forge.";
	text2 = "_Hello, I'm Smithers, can I interest you in some weapons?_";
	text5 = "Smithers continues working the steel under his hammer while awaiting your question.";
	action = INTRO;

begintalknode 16;
	state = 11;
	personality = 113;
	nextstate = 12;
	condition = 1;
	question = "What is your job?";
	text1 = "_I create weapons and armor for sale._";

begintalknode 17;
	state = 11;
	personality = 113;
	nextstate = -1;
	condition = 1;
	question = "Can we do some shopping?";
	text1 = "You finish shopping.";
	action = END_TALK;
	code =
		begin_shop_mode("Smithers Blacksmith","Smither's blacksmith produces good armor and steel weapons. The prices are very competitive.",6,2,3);
	break;
	
begintalknode 18;
	state = 12;
	personality = 113;
	nextstate = -1;
	condition = 1;
	question = "Do you have many customers?";
	text1 = "_Fair to meddling._";
	text2 = "He wipes the sweat off and looks hopefully at you.";
